<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="module" src="./config.js"></script>

    <!-- export [test.js] 导出
 let myName = "Tom";
 let myAge = 20;
 let myfn = function(){
     return "My name is" + myName + "! I'm '" + myAge + "years old."
 }
 let myClass =  class myClass {
     static a = "yeah!";
 }
 export { myName, myAge, myfn, myClass } -->
 
    <!-- import [config.js] 导入
 import { myName, myAge, myfn, myClass } from "./test.js";
 console.log(myfn());// My name is Tom! I'm 20 years old.
 console.log(myAge);// 20
 console.log(myName);// Tom
 console.log(myClass.a );// yeah! -->
</body>
</html>